<template>
  <view class="wrap">
     <top-tab tabTitle="积分记录" @backClick="backClick" backColor="#6732B8"/>
		 <view class="main">
			<view class="integ-list" v-for="(item,index) in integList" :key="item.id">
				<view class="title">{{item.name}}</view>
				<view class="time">{{item.time}}</view>
				<view class="add-num">{{item.addNum}}</view>
			</view>
		 </view>
  </view>
</template>

<script>
	import topTab from '@/components/top-tabbar.vue'
  export default {
		components: { topTab },
    data() {
      return {
				integList: [
					{ id: 1, name: '每日签到', time: '2021.7.21', addNum: '+30' },
					{ id: 2, name: '查看热门商品', time: '2021.7.23', addNum: '+10' },
					{ id: 3, name: '绑定邮箱', time: '2021.7.25', addNum: '+40' },
					{ id: 4, name: '每日签到', time: '2021.7.21', addNum: '+30' },
					{ id: 5, name: '购买商品', time: '2021.7.27', addNum: '+1000' },
					{ id: 6, name: '看视频', time: '2021.8.5', addNum: '+30' },
					{ id: 7, name: '浏览商品', time: '2021.8.11', addNum: '+20' },
					{ id: 8, name: '连续签到7天', time: '2021.7.21', addNum: '+3000' }
				]
			}
    },
  onShow() {},
  methods: {
		// 返回上一页
		backClick() {
			uni.navigateTo({
			   url: '/pages/my/sign/store'
			});
		}
	}
}
</script>

<style lang="scss" scoped>
	.wrap{
		background: #f2f2f2;
		height: 100vh;
		.main{
			padding: 30rpx;
			.integ-list{
				width: 100%;
				height: 110rpx;
				background: #FFFFFF;
				border-radius: 10rpx;
				margin-bottom: 20rpx;
				padding: 0 30rpx;
				box-sizing: border-box;
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-size: 28rpx;
				color: #333333;
				.title{
					flex:5;
				}
				.time{
					flex:4;
					font-size: 24rpx;
					font-family: iekie;
					font-weight: 400;
					color: #999999;
				}
				.add-num{
					flex:2;
					text-align: right;
					font-family: Kozuka Gothic Pr6N;
					font-weight: 500;
					color: #7F2EE1;
				}
			}
		}
	}
</style>
